package com.twu.biblioteca;

import com.twu.biblioteca.DAO.BookDAO;
import com.twu.biblioteca.DAO.MovieDAO;
import com.twu.biblioteca.DAO.UserDAO;
import com.twu.biblioteca.controller.Controller;
import com.twu.biblioteca.controller.LoginController;
import com.twu.biblioteca.controller.MainMenuController;
import com.twu.biblioteca.model.User;
import com.twu.biblioteca.view.BookListView;
import javafx.beans.value.ObservableBooleanValue;

import java.util.Scanner;

public class BibliotecaApp {

    private Controller controller;
    private BookDAO bookDAO;
    private MovieDAO movieDAO;
    private UserDAO userDAO;
    private User user;

    public static void main(String[] args) {
        new BibliotecaApp().run();
    }

    public BibliotecaApp() {
        bookDAO = new BookDAO();
        movieDAO = new MovieDAO();
        userDAO = new UserDAO();
    }

    public void run() {
        println("Welcome to Biblotheca!\n");
        this.controller = new LoginController(new Scanner(System.in), this);
    }

    public void setController(Controller controller) {
        this.controller = controller;
    }

    public void println(String content) {
        System.out.println(content);
    }

    public BookDAO getBookDAO() {
        return bookDAO;
    }

    public MovieDAO getMovieDAO() {
        return movieDAO;
    }

    public UserDAO getUserDAO() {
        return userDAO;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }
}

